import http from '../../utils/request/request'

export function getInfoBypage(page = 1, size = 5) {
  return http({
    url: `/processing/processing-material/?currentPage=${page}&pageSize=${size}&variety=&inputType&sku=`,
    method:'get'
  })
}

export function searchInfoByName(data) {
  return http({
    url: `/processing/processing-material/allName`,
    method: 'get',
    data
  })
}

export function addInfo(data) {
  return http({
    url: '/processing/processing-material/',
    method: 'post',
    data
  })
}

export function editInfo(data) {
  return http({
    url: '/processing/processing-material/',
    method: 'put',
    data
  })
}

export function delInfo(id) {
  return http({
    url: `/processing/processing-material/?id=${id}`,
    method:'delete'
  })
}

export function detialInfo(data) {
  return http({
    url: '/processing/processing-material/',
    method:'get'
  })
}

export function searchInfoByvariety(variety) {
  return http({
    url: `/processing/processing-material/?no=1&size=500&variety=${variety}&inputType&sku=`,
    method:'get'
  })
}

export function searchInfoByinputType(inputType) {
  return http({
    url: `/processing/processing-material/?no=1&size=500&variety&inputType=${inputType}&sku=`,
    method:'get'
  })
}

